<script setup lang="ts">
defineProps<{
  name: string
  avatar: string
  followers: number
}>()
</script>

<template>
  <div class="streamer-info">
    <img :src="avatar" :alt="name" class="avatar">
    <div class="info">
      <h3>{{ name }}</h3>
      <p>{{ followers }} 粉丝</p>
    </div>
    <button class="follow-btn">关注</button>
  </div>
</template>

<style scoped>
.streamer-info {
  background: #1a1a1a;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.info {
  flex: 1;
}

.info h3 {
  margin: 0;
  color: #fff;
}

.info p {
  margin: 0.25rem 0 0;
  color: #888;
  font-size: 0.9em;
}

.follow-btn {
  background: #646cff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.follow-btn:hover {
  background: #747bff;
}
</style>